package com.love.rongapi.init;

import com.love.rongapi.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Slf4j
@Component
public class InitRunner implements ApplicationRunner {

    @Resource
    private UserService userService;

    @Override
    public void run(ApplicationArguments args) {
        log.info("InitRunner run begin...");

        Boolean initNickName = userService.initNickName();
        log.info("userService initNickName: {}", initNickName);
    }

}
